package com.iplant.mes.service.mesenum.exc;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 返修记录状态
 *
 * @author pyw
 * 2023-12-21 16:21:31
 */
public enum EXCProductRepairItemStatus implements BaseEnum {
    /**
     * 保存
     */
    Default(0, "保存"),
    /**
     * 执行中
     */
    InProgress(1, "执行中"),
    /**
     * 检验完成合格
     */
    CheckGood(2, "检验完成合格"),
    /**
     * 检验完成不合格
     */
    CheckBad(3, "检验完成不合格"),
    /**
     * 报工完成
     */
    Reported(4, "报工完成");

    private int value;
    private String label;

    EXCProductRepairItemStatus(int value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 通过 value 的数值获取枚举实例
     *
     * @param val
     * @return
     */
    public static EXCProductRepairItemStatus getEnumType(int val) {
        for (EXCProductRepairItemStatus type : EXCProductRepairItemStatus.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    @Override
    public void setValue(int wValue) {
        this.value = wValue;
    }

    @Override
    public void setLabel(String wLabel) {
        this.label = wLabel;
    }

    @Override
    public String getRemark() {
        return null;
    }

    @Override
    public void setRemark(String remark) {

    }

}
